using System;
using System.Text;
using TccAg.VO;
using TccAg.DA;
using System.Data;
using System.Collections;
using System.Collections.Generic;


namespace TccAg.BR
{
    public class HorarioBR
    {
        private HorarioDA horarioDA = new HorarioDA();

        //INSERIR 
        public int inserir(HorarioVO horario)
        {
            try
            {
                return horarioDA.inserir(horario);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //ATUALIZAR 
        public int atualizar(HorarioVO horario)
        {
            try
            {
                return horarioDA.atualizar(horario);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //EXCLUIR 
        public int excluir(HorarioVO horario)
        {
            try
            {
                return horarioDA.excluir(horario);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //LOAD ALL 
        public List<HorarioVO> loadAll()
        {
            try
            {
                return horarioDA.loadAll();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //LOAD BY PK
        public HorarioVO loadByPk(HorarioVO horario)
        {
            try
            {
                return horarioDA.loadByPk(horario);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //LOAD BY FK
        public List<HorarioVO> loadByFk(HorarioVO horario)
        {
            try
            {
                return horarioDA.loadByFk(horario);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        //DATATABLE LOAD ALL 
        public DataTable dataTableLoadAll()
        {
            try
            {
                return horarioDA.dataTableLoadAll();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<HorarioVO> loadByProfessor(HorarioVO horario, ProfessorVO professor)
        {
            try
            {
                return horarioDA.loadByProfessor(horario, professor);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
